<%@ page import="myschool.entity.Subject" %>
<%@ page import="myschool.service.SubjectService" %><%--
  Created by IntelliJ IDEA.
  User: admin
  Date: 2022/7/4
  Time: 17:21
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>修改</title>
</head>
<body>
<%
    request.setCharacterEncoding("utf-8");
    int id = Integer.parseInt(request.getParameter("id"));
    String sbname = request.getParameter("sbname");
    int sbhour = Integer.parseInt(request.getParameter("sbhour"));
    int sbgid = Integer.parseInt(request.getParameter("sbgid"));
    Subject subject = new Subject();
    subject.setId(id);
    subject.setSubjectname(sbname);
    subject.setClasshour(sbhour);
    subject.setGradeid(sbgid);
    int update = SubjectService.ME.update(subject);
    if (update > 0) {%>
<h2>
    修改成功！
</h2>
<%} else {%>
<h2>
    修改失败！
</h2>
<%}%>
</body>
</html>